#ifndef PATIENTSELECTDIALOG_H
#define PATIENTSELECTDIALOG_H

#include <QDialog>
#include <QSqlRecord>
class QSqlQueryModel;

namespace Ui {
class PatientSelectDialog;
}

class PatientSelectDialog : public QDialog
{
    Q_OBJECT

public:
    explicit PatientSelectDialog(const QString &name, QWidget *parent = 0);
    ~PatientSelectDialog();

    const QSqlRecord &getStudy() const { return study; }

protected slots:
    void onSelect();
    void onItemActivated(const QModelIndex &index);

private:
    Ui::PatientSelectDialog *ui;
    QSqlRecord study;
    QSqlQueryModel *m;

};

#endif // PATIENTSELECTDIALOG_H
